{*
	Login page
	For PrayOnline
	@author: trungdt
*}
<div class="loginmodule login-default" >

	{if $smarty.const.PREVIEW_READONLY == 1}
		{$_TR.logged_in_users}:
	{/if}
	
	{if $loggedin == true || $smarty.const.PREVIEW_READONLY == 1}
		<h2>{$_TR.welcome|sprintf:$displayname}</h2>
		<a href="{link action=editprofile}">{$_TR.edit_profile}</a>
	
		{if $is_group_admin}
		<a href="{link action=mygroups}">{$_TR.my_groups}</a><br />
		{/if}
	
		<a href="{link action=changepass}">{$_TR.change_password}</a>
		<a href="{link action=logout}">{$_TR.logout}</a>
	{/if}
	
	{if $smarty.const.PREVIEW_READONLY == 1}
		{$_TR.anon_users}:
	{/if}
	
	{if $loggedin == false || $smarty.const.PREVIEW_READONLY == 1}
	<form id="login" action="index.php" method="post">
			<input type="hidden" name="action" value="login">
			<input type="hidden" name="module" value="loginmodule">
			<div class="control" id="usernameControl">
				<label>
					<span class="label">Tên&nbsp;đăng&nbsp;nhập</span>
				</label>
				<input type="text" value="" name="username" class="text" size=32>
			</div>
			<div class="control" id="usernameControl">
				<label>
					<span class="label">Mật khẩu</span>
				</label>
				<input type="password" value="" name="password" class="text" size=32>
			</div>
		<table style="border: 0;">
			<tr style="border: 0;">
				<td style="border: 0;">
					<input type="submit" class="login_button" style="float: none;" value="Đăng nhập">
				</td>
				<td style="padding: 10px; border: 0;">
					{if ($smarty.const.SITE_ALLOW_REGISTRATION == 1 && $smarty.const.MAINTENANCE_MODE != 1)}
						<a href="{link action=createuser}">{$_TR.create_account}</a><br />
						<a href="{link action=resetpass}">{$_TR.forgot_password}</a><br />
					{/if}
				</td>
			</tr>
		</table>
				</form>
		{/if}

</div>


